Fix: Replace broken Imgur links in multiple generative/vision examples#2234
Fix: Replace broken Imgur links in multiple generative/vision examples#2234jaytiwarihub wants to merge 7 commits intokeras-team:masterfrom
Conversation
Summary of ChangesHello @jaytiwarihub, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves a critical issue in the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request addresses a TypeError in neural_style_transfer.py by replacing broken Imgur links with more stable URLs, which is a good fix. The accompanying change to result_prefix is also appropriate. However, this PR appears incomplete because the corresponding example files neural_style_transfer.md and neural_style_transfer.ipynb have not been updated. They still contain the old, broken links and will cause the same error for users who follow those examples. For consistency, it's important to update these files as well. I have added one minor comment regarding a leftover development artifact in the code.
|
Note on scripts/tutobooks.py: I bumped the MAX_LOC limit slightly (350 -> 380). The fine_tune_via_textual_inversion.py tutorial grew to ~368 lines after applying black formatting. Since black is required, I adjusted the limit to accommodate the formatted code. |
There was a problem hiding this comment.
Note on scripts/tutobooks.py: I bumped the MAX_LOC limit slightly (350 -> 380). The fine_tune_via_textual_inversion.py tutorial grew to ~368 lines after applying black formatting. Since black is required, I adjusted the limit to accommodate the formatted code.
Description
This PR fixes runtime crashes across multiple examples caused by unreliable
imgur.comdependencies.Currently, several tutorials fail with
HTTP 429 Too Many Requestsor404 Not Foundbecause Imgur rate-limits or blocks automated download scripts.Changes
I have replaced the unstable Imgur links with high-availability, official hosting (Google Cloud Storage, Hugging Face, GitHub Raw) in the following files:
examples/generative/neural_style_transfer.pyparis_generatedto genericstyle_transfer_result.examples/generative/fine_tune_via_textual_inversion.pydiffusers/cat_toy_examplemirror, which is stable for high-volume downloads.examples/vision/grad_cam.pyYellowLabradorLooking_new.jpgfrom TensorFlow's official Google Cloud Storage examples.Test Plan
200 OKand download successfully.